---
title: "Globe"
author: "Renan Peres"
date: "09/23/2022"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
social: menu
source_code: embed
---
```{r setup, include=FALSE}
library(flexdashboard)
library(tidyverse)
library(echarts4r)
library(echarts4r.assets)
flights <- read.csv(
paste0("https://raw.githubusercontent.com/plotly/datasets/",
"master/2011_february_aa_flight_paths.csv")
)
```
Column {data-width=1000}
-----------------------------------------------------------------------
### Globe
```{r}
flights |>
e_charts() |>
e_globe(
environment = ea_asset("starfield"),
base_texture = ea_asset("world night"),
height_texture = ea_asset("world night"),
displacementScale = 0.05
) |>
e_lines_3d(
start_lon,
start_lat,
end_lon,
end_lat,
name = "flights",
effect = list(show = TRUE)
) |>
e_legend(FALSE)
```